@import '../var';

.cm-list {
  z-index: 10000;
  background-color: $background;
  color: $text;
  position: absolute;
  font-size: 1rem;
  padding: 4px 0;
  border-radius: 3px;
  border: 1px solid $border;
  hr {
    height: 1px;
    margin: 0 0;
    background-color: $border;
  }
  .cm-label {
    color: $text-light;
    font-size: 0.8rem;
    padding: 0.25em 0.5em;
    // padding: 0.5em 0.75em;
    position: relative;
    display: flex;
    flex-direction: row;
    i {
      flex-grow: 0;
      margin-right: 5px;
    }
  }
  .cm-row {
    // padding: 0.25em 0.5em;
    padding: 0.5em 0.75em;
    display: flex;
    flex-direction: row;
    min-width: 9em;
    i {
      flex-grow: 0;
      margin-right: 5px;
    }
    .cm-arrow {
      flex-grow: 0;
      font-size: 0.8rem;
    }
    .cm-text {
      flex-grow: 1;
      padding-right: 1em;
    }
  }
  .cm-item {
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    .cm-list {
      margin-top: -4px;
      margin-left: -1px;
      display: none;
      top: 0;
      left: 100%;
    }
    &.has-list {
      cursor: default;
    }

    &:hover {
      background-color: $primary-light;
      color: $primary-dark;
      > .cm-list {
        display: block;
      }
    }
  }
}
